#ifndef _SHADERLOADER_H
#define _SHADERLOADER_H

#include <string>
#include <memory>
#include <SERender/Resourses/Shader.h>


namespace SEngine
{
    struct UniformBlockBinder 
    {
        virtual void Bind(Shader & shader) {}
    };

    class ShaderLoader
    {
    public:
        ShaderLoader() = default;
        virtual ~ShaderLoader() = default;

        ShaderLoader & Load(const std::string & fileName);

        template<typename T = Shader>
        std::unique_ptr<T> CreateShader(UniformBlockBinder& binder = UniformBlockBinder());

    private:
        void LoadUniforms(Shader & shader);
        void LoadUniformBlocks(Shader & shader);
        void CreateShaderImpl(Shader & shader);

    private:
        // std::string m_name;
        std::string m_vs;
        std::string m_gs;
        std::string m_fs;
        // static std::shared_ptr<Texture> s_defaultTex;
    };
} // namespace SEngine


#endif